#include "ui_handle.h"
#include "ui_menu.h"
#include "ui_index.h"

static int _8_light = 0, _8_light_temp = 0;

void _4_Show(void *pnode, int key) {
	printf("删除四回路控制器\n");
	Delete_This_Page((MENU_PARAS_NODE *)pnode);
}

void _8_Power_On(void *pnode, int key) {
	printf("八回路所有路开机\n");
}

void _2_Adjust_Light(void *pnode, int key) {	
	 if ('e' == key) {
		_8_light_temp = _8_light;			
	} else if ('w' == key) {
		if (_8_light_temp < 100)  _8_light_temp++;			
	} else if ('z' == key) {
		if (_8_light_temp > 0)  _8_light_temp--;		
	} else if ('a' == key) {		
		printf("向左选择\n");		
	} else if ('d' == key) {
		printf("向右选择\n");				
	}
	printf("调光:%d\n", _8_light_temp); 	
}

void _2_Adjust_ALL_Light_Enter(void *pnode, int key) {
	_8_light = _8_light_temp;
	printf("双灯所有路全控调光确认:%d\n", _8_light); 	
}

void _2_1_Adjust_ALL_Light_Enter(void *pnode, int key) {
	_8_light = _8_light_temp;
	printf("双灯第一路全控调光确认:%d\n", _8_light); 	
}

void _2_2_Adjust_ALL_Light_Enter(void *pnode, int key) {
	_8_light = _8_light_temp;
	printf("双灯第二路全控调光确认:%d\n", _8_light); 	
}

void _2_Adjust_Light_Exit(void *pnode, int key) {
	printf("双灯所有路调光取消:%d\n", _8_light); 	
}

void Dev_Mac_Set(void *pnode, int key) {
	 if ('e' == key) {
		//printf("mac\n");				
	} else if ('w' == key) {
		printf("向上\n");		
	} else if ('z' == key) {
		printf("向下\n");		
	} else if ('a' == key) {		
		printf("a");		
	} else if ('d' == key) {
		printf("d");				
	}
	printf("mac\n");				
}

void Gw_Info_Show(void *pnode, int key) {
	printf("电流\n"); 	
	printf("电压\n"); 	
	printf("电量\n"); 		
	printf("功率\n"); 	
}

void Dev_Info_Show(void *pnode, int key) {
	printf("电流\n"); 	
	printf("电压\n"); 	
	printf("电量\n"); 		
	printf("功率\n"); 	
}

